#coding:utf8
#author:HaxtraZ
class CSn(object):
    def __init__(self,k):
        self.n = 1
        self.sn = 0
        # self.cal(0, k, 1)
        self.cal2(k)

    def cal(self,Sn,k,n):
        Sn = self.calSn(Sn, n)
        if Sn > k:
            self.sn = Sn
            self.n = n
        else:
            self.cal(Sn, k, n + 1)
        pass

    def calSn(self,Sn,n):
        Sn = Sn + 1.0 / n
        return Sn

    def cal2(self,k):
        sn = 0
        n = 1
        while(sn < k):
            sn = sn + 1.0/n
            n +=1
        self.sn = sn
        self.n = n

    def printSn(self):
        print self.n
        print self.sn

# def calSn(Sn,n):
#     Sn = Sn + 1.0/n
#     print("calsn = %d,n=%d",Sn,n)
#     return Sn
#
# def cal(Sn,k,n):
#     Sn = calSn(Sn,n)
#     print("sn...",Sn)
#     if Sn > k:
#         return n
#     else:
#         cal(Sn,k,n+1)

if __name__ == "__main__":
    # k = input("input k:")
    while(1):
        k = input("input k:")
        sn = CSn(k)
        # print(Sn)
        sn.printSn()

